function getXMLData(varMode,varUID) {
	var xmlhttp = false;
	
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest && !(window.ActiveXObject)) {
    	try {
			xmlhttp = new XMLHttpRequest();
        } catch(e) {
			xmlhttp = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		xmlhttp = false;
        	}
		}
    }
	if(xmlhttp) {
		//xmlhttp.onreadystatechange = function() { alertContents(varMode,xmlhttp); };
		xmlhttp.open("GET",'resxml.asp?RUID=' + varUID, false);
		xmlhttp.send("");
		alertContents(varMode,xmlhttp);
	}
}

function alertContents(varMode,xmlhttp)
{ 
	switch(xmlhttp.readyState)
	{
		case 0:
			//Uninitialized;
			break;

		case 1:
			//Loading
			break;

		case 2:
			//Loaded
			break;

		case 3:
			//Interactive
			break;

		case 4:
			//Complete
            if (xmlhttp.status == 200) {
            	//OK response received
            	switch (varMode)
            	{
            		case 'C':
						xmlCDoc=xmlhttp.responseXML;
						listTypes('C');
						break;

            		case 'F':
						xmlFDoc=xmlhttp.responseXML;
						listTypes('F');
						break;
				}

            } else {
            	//Some kind of error.
                alert('There was a problem with the request. Status Code: ' + xmlhttp.status);
            }
			break;
	}
}